<?php
//先设置命名空间为后台，控制器
namespace Admin\Controller;
//使用Think文件夹里面的Controller类，并一定要继承controller，才可使自定义控制正常使用

use Think\Controller;
class AcController extends CommonController{

    //定义控制器的方法
    function index(){
        $ac = M('ac_user');
        $where = '';
        $count=$ac->where($where)->count();
        $limit = 10;
        $page=new \Org\Page($count,$limit);
        $a =$ac->where($where)->order('id desc')->limit($page->firstRow.','.$page->listRows)->select();
        $show=$page->show();
        $this->assign('list',$a);
        $this->assign('show',$show);
        $this->display();
    }



    function user(){
        $user = M('ac_user_time');
        $where = '';
        $count = $user->where($where)->count();
        $limit = 10;
        $page=new \Org\Page($count,$limit);
        $a =$user->where($where)->order('id desc')->limit($page->firstRow.','.$page->listRows)->select();
        $show=$page->show();
        $this->assign('list',$a);
        $this->assign('show',$show);
        $this->display();
    }

}
